package com.TeaManage.bean;

public class PurchaseItem {
    private Integer item_id;
    private Integer purchase_id;
    private Integer tea_id;
    private Double quantity;
    private Double unit_price;
    private Double subtotal; // 小计金额

    // 关联对象，用于显示
    private Tea tea;

    public PurchaseItem() {
    }

    public PurchaseItem(Integer item_id, Integer purchase_id, Integer tea_id, Double quantity, Double unit_price) {
        this.item_id = item_id;
        this.purchase_id = purchase_id;
        this.tea_id = tea_id;
        this.quantity = quantity;
        this.unit_price = unit_price;
    }

    /**
     * 获取
     * @return item_id
     */
    public Integer getItem_id() {
        return item_id;
    }

    /**
     * 设置
     * @param item_id
     */
    public void setItem_id(Integer item_id) {
        this.item_id = item_id;
    }

    /**
     * 获取
     * @return purchase_id
     */
    public Integer getPurchase_id() {
        return purchase_id;
    }

    /**
     * 设置
     * @param purchase_id
     */
    public void setPurchase_id(Integer purchase_id) {
        this.purchase_id = purchase_id;
    }

    /**
     * 获取
     * @return tea_id
     */
    public Integer getTea_id() {
        return tea_id;
    }

    /**
     * 设置
     * @param tea_id
     */
    public void setTea_id(Integer tea_id) {
        this.tea_id = tea_id;
    }

    /**
     * 获取
     * @return quantity
     */
    public Double getQuantity() {
        return quantity;
    }

    /**
     * 设置
     * @param quantity
     */
    public void setQuantity(Double quantity) {
        this.quantity = quantity;
    }

    /**
     * 获取
     * @return unit_price
     */
    public Double getUnit_price() {
        return unit_price;
    }

    /**
     * 设置
     * @param unit_price
     */
    public void setUnit_price(Double unit_price) {
        this.unit_price = unit_price;
    }

    /**
     * 获取
     * @return subtotal
     */
    public Double getSubtotal() {
        return subtotal;
    }

    /**
     * 设置
     * @param subtotal
     */
    public void setSubtotal(Double subtotal) {
        this.subtotal = subtotal;
    }

    /**
     * 获取
     * @return tea
     */
    public Tea getTea() {
        return tea;
    }

    /**
     * 设置
     * @param tea
     */
    public void setTea(Tea tea) {
        this.tea = tea;
    }

    public String toString() {
        return "PurchaseItem{item_id = " + item_id + ", purchase_id = " + purchase_id + ", tea_id = " + tea_id + ", quantity = " + quantity + ", unit_price = " + unit_price + ", subtotal = " + subtotal + "}";
    }
}
